<?php

include_once('admin/structures/tableEditors.php');
include_once('admin/structures/editorFields.php');

class adminSeries extends simpleTableEditor
{
    //construct games object
    function adminSeries()
    {
        global $lang;

        $this->simpleTableEditor(SERIES_TABLE, 'series', 'Series',  $lang['SeriesExplanation'], true, true);
        $this->addColumn(new fieldId('s_id'));
        $this->addColumn(new fieldTitle($lang['FullTitle'],'s_title','',45));
        $this->addColumn(new fieldLongText($lang['About'],'s_about','',6));
        $logoThmb = new fieldDummy('s_logoThmb');
        $this->addColumn(new fieldImage($lang['Logo'],'s_logo','','series',200,150, false, true, $logoThmb, 80, 60));
        $this->addColumn($logoThmb);
        $this->addColumn(new fieldInfoOnly($lang['Championships'],'Championships','',
                'SELECT c_title
                    FROM '. CHAMPIONSHIPS_TABLE . ' WHERE c_series = %1$s
                    ORDER BY c_lastRace DESC', 'c_title'));
        $this->doStuff();

    }
}
?>
